package statistics.demo.statistics_demo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends BaseActivity {

    private Button mCaloriesBtn;
    private Button mMotionBtn;
    private Button mSleepBtn;

    @Override
    protected void initView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_main);
        mCaloriesBtn = getViewById(R.id.calories);
        mMotionBtn = getViewById(R.id.motion);
        mSleepBtn = getViewById(R.id.sleep);
    }

    @Override
    protected void setListener() {

        mCaloriesBtn.setOnClickListener(this);
        mMotionBtn.setOnClickListener(this);
        mSleepBtn.setOnClickListener(this);
    }

    @Override
    protected void processLogic(Bundle savedInstanceState) {
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.calories:
                Intent CaloriesIntent = new Intent(this, CaloriesActivity.class);
                startActivity(CaloriesIntent);
                break;
            case R.id.motion:
                Intent motionIntent = new Intent(this, MotionActivity.class);
                startActivity(motionIntent);
                break;
            case R.id.sleep:
                Intent sleepIntent = new Intent(this, SleepActivity.class);
                startActivity(sleepIntent);
                break;
        }

    }
}
